package com.mk3.controller;
import com.mk3.model.Student;
import com.mk3.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author mk.chen
 * @since 2019-12-27
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentService studentService;

    @GetMapping("selectAll")
    public Object selectAll() {
        List<Student> students = studentService.selectALL();
        return students;
    }

}